//
//  ThirdHeadView.m
//  League
//
//  Created by 博宇 李 on 2018/1/23.
//  Copyright © 2018年 ciyuanjuzhen. All rights reserved.
//

#import "ThirdHeadView.h"
#import "BaseViewController.h"
@implementation ThirdHeadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.frame=frame;
        self.backgroundColor = [UIColor whiteColor];
        self.clipsToBounds=YES;
        [self setupUI];
    }
    return self;
}
-(void)setupUI
{
    self.titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, ktitleH)];
    
    self.titleLab.text = @"Settings";
    self.titleLab.font = [UIFont fontWithName:kFontName size:30];
//    self.titleLab.backgroundColor = [UIColor redColor];
    self.titleLab.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.titleLab];
    
    self.headImageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kHeadImgWH, kHeadImgWH)];
    self.headImageV.center = CGPointMake(self.width/2, self.titleLab.height+self.headImageV.height/2);
//     self.headImageV.backgroundColor = [UIColor greenColor];

    [self addSubview:self.headImageV];
    
    
    self.emailLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, kUserNameLabH)];
    self.emailLab.center = CGPointMake(self.width/2, self.headImageV.y+self.headImageV.height+self.emailLab.height/2);
//    self.emailLab.backgroundColor = [UIColor yellowColor];
    self.emailLab.font = [UIFont fontWithName:kFontName size:self.emailLab.height];
    self.emailLab.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.emailLab];
    
    self.sinceLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, kUserNameLabH)];
    self.sinceLab.center = CGPointMake(self.width/2, self.emailLab.y+self.emailLab.height+self.sinceLab.height/2);
//    self.sinceLab.backgroundColor = [UIColor brownColor];
    self.sinceLab.font = [UIFont fontWithName:kFontName size:self.sinceLab.height*0.8];
    self.sinceLab.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.sinceLab];
//    kUserNameLabH
}
@end
